package com.mazaiting.blog.domain

import javax.validation.constraints.NotBlank
import javax.validation.constraints.NotEmpty

/**
 * 用户实体类
 */
data class User (
        /**插入ID*/
        val id: Long,
        /**用户名*/
        @NotEmpty(message = "用户名不能为空")
        @NotBlank(message = "用户名不能为空哟")
        val username: String,
        /**密码*/
        @NotEmpty(message = "密码不能为空")
        @NotBlank(message = "密码不能为空哟")
        val password: String
) {
        constructor(
                username: String,
                password: String): this(0, username, password)
}